package com.inno.launcher.api;

import com.inno.launcher.base_rebuild.BaseApi;
import com.inno.launcher.https_rebuild.HttpService;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * @author (zijie)
 * @datetime 2021-10-27 17:40
 * @email hezijie@inno-cn.cn
 * @detali：
 */
public class MarketApi extends BaseApi {
    private String category;
    private String pageSize;
    private int pageNum;
    private String state;

    public void setCategory(String category) {
        this.category = category;
    }

    public void setPageSize(String pageSize) {
        this.pageSize = pageSize;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public void setState(String state) {
        this.state = state;
    }

    public MarketApi(RxAppCompatActivity rxAppCompatActivity) {
        super(rxAppCompatActivity);
        setShowProgress(true);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        return retrofit.create(HttpService.class).getMarket(category,pageNum,pageSize,state);
    }

}
